package com.m3958.firstgwt.client.ui;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.m3958.gwtutil.clientside.client.YuiWrapper;

public class FirstGwtSharedMenuBar extends Composite {

	private static FirstGwtSharedMenuBarUiBinder uiBinder = GWT
			.create(FirstGwtSharedMenuBarUiBinder.class);

	interface FirstGwtSharedMenuBarUiBinder extends
			UiBinder<Widget, FirstGwtSharedMenuBar> {
	}
	
	@Inject
	private YuiWrapper yui;

	public FirstGwtSharedMenuBar() {
		initWidget(uiBinder.createAndBindUi(this));
		sinkEvents(Event.ONCLICK);
	}
	
	public void onBrowserEvent(Event event){
		yui.logInt(DOM.eventGetType(event));
		yui.logString(DOM.eventGetTarget(event).getNodeName());
		yui.logString(DOM.eventGetTarget(event).getNodeValue());
	}

}
